Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add linter & fix errors #578

Merged
merged 1 commit into from
Jul 23, 2024
Merged

chore: add linter & fix errors #578

merged 1 commit into from
Jul 23, 2024

Conversation

Kabir-Ivan
Copy link
Contributor

@Kabir-Ivan Kabir-Ivan commented Jul 22, 2024

Enable linter for .jsx, .ts and .tsx.

@@ -26,7 +26,7 @@
"e2e:generate-fixtures": "npm run --workspace=test/func/fixtures generate",
"e2e:test": "npm run --workspace=test/func/tests test",
"e2e": "npm run e2e:build-packages && npm run e2e:generate-fixtures ; npm run e2e:test",
"lint": "eslint .",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we specify this in .eslintrc.js itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. Looks like .eslintrc.js has no such option.

Copy link
Member

@shadowusr shadowusr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides a few minor issues, looks good to me

@@ -103,7 +103,7 @@ describe('<BrowserTitle/>', () => {
const browsersStateById = {'yabro': {checkStatus: UNCHECKED}};
const tree = mkStateTree({browsersById, resultsById, browsersStateById});

const component = mkBrowserTitleComponent({browserId: 'yabro', browserName: 'yabro'}, {tree});
mkBrowserTitleComponent({browserId: 'yabro', browserName: 'yabro'}, {tree});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this line do anything? As far as I can tell we are just callling a function that returns a value and ignore the value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It calls a stub that is used in assert inside the component.

@@ -35,6 +35,9 @@ describe('<ScreenshotAccepter/>', () => {
};

const mkScreenshotAccepterComponent = (props = {}, initialState = {}) => {
if (!global.Element.prototype.scrollTo) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. How did it work before?

@@ -116,7 +116,7 @@ describe('<RunButton />', () => {

it('should switch to "Run checked tests" if there are checked tests', () => {
selectorsStub.getCheckedTests.returns([{testName: 'testName', browserName: 'browserName'}]);
const component = mkConnectedComponent(<RunButton />, {
mkConnectedComponent(<RunButton />, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this line do anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It calls a stub that is used in assert inside the component.

@Kabir-Ivan Kabir-Ivan merged commit dcd0930 into master Jul 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants